$(function() {
	$("#left").load("../common/gover-left.html");
	var userId = sessionStorage.getItem("userId");
	$(".ystep1").loadStep({
		size: "small",
		color: "green",
		steps: [{
				title: "事项选择"
			},
			{
				title: "服务选择"
			},
			{
				title: "信息录入"
			},
			{
				title: "寄件选择"
			},
			{
				title: "取件选择"
			},
			{
				title: "提交成功"
			}
		]
	});
	$(".ystep1").setStep(6);
	my_vue = new Vue({
		el: '#vue_info',
		data: {

		},
		methods: {
			exitProcess: function(op) {
				if(op == 'index') {
					$.showConfirm({
						'title': '',
						'content': '是否退出办理？',
						"showClose": false,
						"sureLabel": "取消",
						"cancelLabel": "退出办理",
						'cancel': this.toIndex
					});
				} else if(op == 'scanner') {
					$.showConfirm({
						'title': '',
						'content': '是否退出办理？',
						"showClose": false,
						"sureLabel": "取消",
						"cancelLabel": "退出办理",
						'cancel': this.toScanner
					});
				}
			},
			toIndex: function() {
				window.location = "index.html"
			},
			toScanner: function() {
				window.location = "scannerIndex.html"
			},
			finish: function() {
				window.location = "index.html"
			},
			doAgain: function() {
				window.location = "selfHelpBusinessChoose.html"
			},
			exitAttendTo: function() {
				$.openDialog({
					'title': '',
					"showClose": false,
					'width': 824,
					'height': 460,
					'url': 'selfHelpExitChoose.html'
				});
			},
			complete: function() {
				this.$http.get('http://192.168.10.45:8888/oc_tengzhou/gover/complete.do', {
					userId: userId,
				}, {
					emulateJSON: true
				}).then(function(result) {
					console.log(toJson(result.data));

				}, function(result) {
					console.log('保存接口失败:' + toJson(result));
				})
			}

		},
		ready: function() {
			//初始化获得总页面数和列表数据
			this.complete();
		}
	});
});